<?php

class PriorityMerchandiseItems extends Zend_Db_Table_Abstract
{
    protected $_name = 'priority_merchandise';
    protected $_rowClass = 'PriorityMerchandiseItem';

    public function getItems()
    {
        $r = $this->fetchAll();
        if(null == $r)
            return array();
        else
            return $r->toArray();
    }
	
	public function setItems( $items )
	{
		$this->delete("true");		
		foreach($items as $item)
		{
			if(!empty($item['FDMS_product_code']))
			{
				$description = $item['description'];
				$description = str_replace("\\", "", $description);
				$item['description'] = addslashes($description);
				$this->insert($item);
			}
		}
	}
}

?>
